package com.example.rae.fallback;

import com.example.rae.base.BaseApiService;
import com.example.rae.base.ResponseBase;
import com.example.rae.entity.UserEntity;
import com.example.rae.feign.IOrderFeign;
import org.springframework.stereotype.Component;

/**
 * @Author YangZeRong
 * @Date 2022/4/17 21:35
 * 服务降级
 * @Version 1.0
 */
@Component
public class MemberServiceFallback extends BaseApiService implements IOrderFeign {
    @Override
    public UserEntity getMember(String name) {
        return null;
    }

    @Override
    public ResponseBase getUserInfo() {
        return setResultError("服务器忙，稍后重启，以类方式写服务降级");
    }
}
